<?php
	/**
	* List of all hot products, sort by brand
	* @author: trungdt
	* @since: Nov 8, 2011
	* @version: 1.0
	* 
	*  
	* Change logs
	*/
	if (!defined('EXPONENT')) exit('');
	$brand_name="";
	if (isset($_REQUEST['brand_name']))
		$brand_name = _ab_safe_html_string($_REQUEST['brand_name']);
	$brand=$db->selectObject("productsmodule_brand", "seo_name = '{$brand_name}'");
	if (isset($brand->id))
	{
		$action_mode = 6; // product by brand mode
		$title_key='product_bybrand_title';
		$breadcum_key='product_bybrand_title';
		$_REQUEST['brand_id']=$brand->id;
		$pf_force_replace=array(
			"%s"=>$brand->title
		);

		include(BASE."modules/productsmodule/actions/products_filter.php");

		// force reset page title
		$title=$lang[$title_key];
		_ab_theme_action_register_title($title);
		_ab_theme_action_register_title($title." - ".$brand->search_des,1,0);
	}
	else
		exponent_flow_redirect();
?>
;